class Animal{
    public String name;
    public int age;

    {
        System.out.println("Animal实例代码块");
    }

    static {
        System.out.println("Animal的静态代码块");
    }
    public Animal(String name ,int age ){
        this.name=name;
        this.age=age;

        System.out.println("Animal.Animal构造方法代码块");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

}

class Dog extends Animal{


    {
        System.out.println("Dog实例代码块");
    }
    static{
        System.out.println("Dog静态代码块");
    }
    public Dog(String name, int age) {
        super(name, age);
        System.out.println("Dog.Dog构造代码块");

    }


}


public class Test {
    public static void main(String[] args) {

        Dog dog=new Dog("张十三",22);


    }
}
